Skip to content

[codex] implement remote connection mode end-to-end#4

Merged
aronprins merged 24 commits intomasterfrom
feature/remote-connection-mode
Apr 10, 2026
Merged

[codex] implement remote connection mode end-to-end#4
aronprins merged 24 commits intomasterfrom
feature/remote-connection-mode

Conversation

@aronprins
Copy link
Copy Markdown
Owner

Summary

This PR implements the remote connection mode feature end-to-end while preserving the existing embedded local mode.

Local vs remote mode support

  • adds a launcher/chooser flow for local_embedded vs remote_existing
  • keeps the embedded local server boot path, progress states, and updater integration for local mode
  • adds remote connection profiles with persistence, CRUD, recent connections, and menu-based quick connect
  • supports remembered startup preference and auto-attempting the last profile when configured

Preflight and security model

  • requires mandatory remote preflight before loading any remote origin
  • validates and normalizes remote URLs and rejects embedded username/password credentials
  • verifies /api/health and /api/auth/get-session
  • allows only authenticated upstream Paperclip remotes with authReady=true
  • blocks non-Paperclip endpoints, TLS failures, and unsupported local_trusted remotes
  • uses exact-origin navigation policy per mode and opens all other http(s) links externally
  • uses no privileged preload surface in remote mode
  • keeps remote browsing state isolated via remote session partitions without storing raw credentials or copied auth tokens

UI implementation from the mockup

  • replaces the old splash-only startup with a launcher window that implements the chooser, remote connect form, verification states, connecting state, error state, saved connections CRUD, and local boot progress states in the mockup’s visual language
  • adds app-menu connection actions for launcher access, local connect, saved/recent remotes, and chooser behavior

Validation

  • pnpm test:connections
  • inline launcher script parse smoke check via new Function(...) against the generated launcher HTML

Notes

  • when a user asks Desktop to remember an otherwise-unsaved remote choice, the app persists that verified remote as a saved profile so the next-launch reconnect target is stable without storing credentials

aronprins and others added 24 commits April 6, 2026 14:00
Make attached launcher modal auto-resize to fit content instead of
using fixed dimensions. Move close button to top-right corner of the
window. Prevent launcher from being resizable in both modes.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Shrink standalone launcher from 1440x900 to 560x620 to match content
- Sync chooser card selection from persisted chooserMode on open
- Switch saved connections from double-click to single-click activation
- Add delete confirmation modal with Cancel default focus and danger button
- Add verification loading state (disabled button, empty-field guard)
- Add HTTP redirect hint for unreachable remotes on plain HTTP
- Show contextual error buttons (local vs remote failure paths)
- Add keyboard support: Arrow keys, Enter, Escape, focus trapping in modals
- Add ARIA roles and focus-visible outlines for chooser cards and connections
- Auto-focus first interactive element on view transitions

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Replace the card-based mode picker with a two-tab interface:
- Local tab: hero layout with Launch button and auto-start checkbox
- Remote tab: saved connections list with single-click connect, Edit
  buttons, empty state, and Add Remote Connection action

Additional changes:
- Animate launcher window height transitions (180ms ease-out cubic)
- Enable dynamic height for standalone mode (not just attached sheets)
- Remove requirements box from remote form (verification enforces these)
- Update all back-navigation: remote form returns to Remote tab,
  error view routes to correct tab, saved connections returns to chooser
- Keyboard: Arrow Left/Right switches tabs, Up/Down navigates remote
  list, Enter activates focused connection
- Gitignore the chooser-variations mockup file

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The resize reporting was accidentally restricted to attached-only mode
during recent refactoring, breaking content-driven sizing for the
standalone loading screen.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Freshly created launcher windows stay hidden until the renderer reports
its actual content height, then show at the correct size. Eliminates
the visible flash from starting at the large initial dimensions.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Use setContentSize instead of setBounds so the viewport matches the
reported content height exactly, and add a small buffer for macOS
sheet frame chrome. Also re-measure after two animation frames to
catch late layout shifts on first open.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@aronprins aronprins marked this pull request as ready for review April 10, 2026 10:37
@aronprins aronprins merged commit f3ab73e into master Apr 10, 2026
@aronprins aronprins deleted the feature/remote-connection-mode branch April 10, 2026 11:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant